<?php


// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport( 'joomla.application.component.model' );


class AplicacionModelPopup extends JModel
{
     var $datos;
    function getData()
    {
        if (empty( $this->datos ))
        {
            $query = ' SELECT * '
            . ' FROM #__misarticulos order by id desc ';

            $this->datos = $this->_getList( $query );
        }

        return $this->datos;
    }
    function introduce($post){
    	  $row =& JTable::getInstance('Zsitio', 'Table');
  	 if (!$row->bind($post)) {
     	 return JError::raiseWarning(500, $row->getError());
   	 }
  	 if (!$row->store()) {
      	return JError::raiseWarning(500, $row->getError());
  	 }
  return 1;	

    	
    	
    }
    function elimina($id){
    		  $row =& JTable::getInstance('MisArticulos', 'Table');
  	 
   	 $row->id = $id ;
  	 if (!$row->delete()) {
      	return JError::raiseWarning(500, $row->getError());
  	 }
  return 1;	
    }

}
?>